#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import get_speed
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    speed = dr.get_speed(id_num=data.id_num)
    rospy.loginfo("get_speed_node: %f" , speed)


def listener():
    rospy.init_node("get_speed", anonymous=True)
    rospy.Subscriber("get_speed", get_speed, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

